package cn.alusiaor.eurekaclientarticleservice.component;

import cn.alusiaor.eurekaclientarticleservice.controller.ArticleController;
import cn.alusiaor.eurekaclientarticleservice.feignclient.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class TaskService {

    @Qualifier("eureka-client-user-service")
    @Autowired
    private UserService userService;

    @Async
    public String doTaskOne(ArticleController.UserDto userDto) {
        String s = userService.callHello(userDto);
        return s;
    }
}
